package com.moli.iov.handle.alarm.enums;

/**
 * <p>
 * 车辆状态  （0:在库；1:到店；2:已售
 * </p>
 *
 * @author: zql
 * @Date: 2019/2/20 14:24
 */
public enum SelledStatusEnum {

    /**
     * 在库
     */
    WAREHOUSE(0, "在库"),

    /**
     * 到店
     */
    STORE(1, "到店"),

    /**
     * 已售
     */
    SELLED(2, "已售");

    private int flag;

    private String msg;

    SelledStatusEnum(int flag, String msg){
        this.flag = flag;
        this.msg = msg;
    }

    public static String getMsg(int flag){
        for(SelledStatusEnum e : SelledStatusEnum.values()){
            if(e.flag == flag){
                return e.msg;
            }
        }
        return "";
    }

    public int getFlag() {
        return flag;
    }

    public String getMsg() {
        return msg;
    }
}
